<?php
defined('BY_JYA') or exit('error');
$_RQ['op']=$_RQ['op']?$_RQ['op']:'basic';
$return=array();
/*******basic*******/
if($_RQ['op']=='basic'){
	if($_RQ['postdata']){
		$postdata=get_postdata();
		$content=$postdata['content'];
		if(!$content){
			exi('请输入聊天内容','error');
		}
		$msg=$this->model('model')->getmsg($content,true);
		exi('api成功:'.$msg);
	}
	$return['item']=array();
	$htmls=array(
		'type'=>'edit',
		'desc'=>'chatGPT聊天测试',
		'edit_tab'=>true,
		'edits'=>array(
			array(
				'title'=>'chatGPT聊天测试',
				'list'=>array(
					array('type'=>'string','title'=>'输入聊天内容','name'=>'content','help'=>''),
				)
			),
		),
	);
	$return['htmls']=$htmls;
	exi($return);
}
